package com.qrxl.common.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.util.Date;

@Data
@ApiModel(value = "分页参数")
public class BaseQuery {
    @ApiModelProperty(value = "主键")
    private String id;

    @ApiModelProperty(value = "页数", required = true)
    @NotNull(message = "page不能为空")
    private Integer page;

    @NotNull(message = "pageSize不能为空")
    @ApiModelProperty(value = "页大小", required = true)
    private Integer pageSize;

    @ApiModelProperty(value = "操作人")
    private String operator;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss.SSS")
    @ApiModelProperty(value = "更新开始时间")
    private Date startUpdateTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss.SSS")
    @ApiModelProperty(value = "更新结束时间")
    private Date endUpdateTime;

    @ApiModelProperty(value = "创建开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss.SSS")
    private Date startCreateTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss.SSS")
    @ApiModelProperty(value = "创建结束时间")
    private Date endCreateTime;
}
